package one.stand.mapper;


import one.stand.model.live.AttentionUserModel;
import one.stand.request.live.AttentionUserFrom;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 短视频关注用户 Mapper 接口
 * </p>
 *
 * @author luoyang
 * @since 2020-05-20
 */
public interface AttentionUserMapper {

    AttentionUserModel queryById(int attentionUserId);

    int insert(AttentionUserModel model);

    int update(AttentionUserModel model);

    int deleteById(int attentionUserId);

    List<AttentionUserModel> queryAllByLimit(int attentionUserId);

    List<AttentionUserModel> queryAll(AttentionUserModel model);

    AttentionUserModel queryByUserId(AttentionUserFrom model);

    /**
     * 查询关注公司的用户
     * @param companyId
     * @return
     */
    List<AttentionUserModel> queryByCompanyId(Integer companyId);

    /**
     * 是否关注 或是否点赞
     * @param userId
     * @param videoId
     * @return
     */
    AttentionUserModel queryUserAndVideo(@Param("userId") Integer userId,@Param("videoId")  Integer videoId,@Param("companyId")  Integer companyId);
}
